3.11.22 \(\int \frac {(-a+b x^n)^p (a+b x^n)^p}{x^2} \, dx\) [1022]

Optimal. Leaf size=76 \[ -\frac {\left (-a+b x^n\right )^p \left (a+b x^n\right )^p \left (1-\frac {b^2 x^{2 n}}{a^2}\right )^{-p} \, _2F_1\left (-\frac {1}{2 n},-p;1-\frac {1}{2 n};\frac {b^2 x^{2 n}}{a^2}\right )}{x} \]

[Out]

-(-a+b*x^n)^p*(a+b*x^n)^p*hypergeom([-p, -1/2/n],[1-1/2/n],b^2*x^(2*n)/a^2)/x/((1-b^2*x^(2*n)/a^2)^p)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {373, 372, 371} \begin {gather*} -\frac {\left (b x^n-a\right )^p \left (a+b x^n\right )^p \left (1-\frac {b^2 x^{2 n}}{a^2}\right )^{-p} \, _2F_1\left (-\frac {1}{2 n},-p;1-\frac {1}{2 n};\frac {b^2 x^{2 n}}{a^2}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((-a + b*x^n)^p*(a + b*x^n)^p)/x^2,x]

[Out]

-(((-a + b*x^n)^p*(a + b*x^n)^p*Hypergeometric2F1[-1/2*1/n, -p, 1 - 1/(2*n), (b^2*x^(2*n))/a^2])/(x*(1 - (b^2*
x^(2*n))/a^2)^p))

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 372

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/
(1 + b*(x^n/a))^FracPart[p]), Int[(c*x)^m*(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[
p, 0] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 373

Int[((c_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(n_))^(p_)*((a2_) + (b2_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a1
+ b1*x^n)^FracPart[p]*((a2 + b2*x^n)^FracPart[p]/(a1*a2 + b1*b2*x^(2*n))^FracPart[p]), Int[(c*x)^m*(a1*a2 + b1
*b2*x^(2*n))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, m, n, p}, x] && EqQ[a2*b1 + a1*b2, 0] &&  !IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\left (-a+b x^n\right )^p \left (a+b x^n\right )^p}{x^2} \, dx &=\left (\left (-a+b x^n\right )^p \left (a+b x^n\right )^p \left (-a^2+b^2 x^{2 n}\right )^{-p}\right ) \int \frac {\left (-a^2+b^2 x^{2 n}\right )^p}{x^2} \, dx\\ &=\left (\left (-a+b x^n\right )^p \left (a+b x^n\right )^p \left (1-\frac {b^2 x^{2 n}}{a^2}\right )^{-p}\right ) \int \frac {\left (1-\frac {b^2 x^{2 n}}{a^2}\right )^p}{x^2} \, dx\\ &=-\frac {\left (-a+b x^n\right )^p \left (a+b x^n\right )^p \left (1-\frac {b^2 x^{2 n}}{a^2}\right )^{-p} \, _2F_1\left (-\frac {1}{2 n},-p;1-\frac {1}{2 n};\frac {b^2 x^{2 n}}{a^2}\right )}{x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 78, normalized size = 1.03 \begin {gather*} -\frac {\left (-a+b x^n\right )^p \left (a+b x^n\right )^p \left (1-\frac {b^2 x^{2 n}}{a^2}\right )^{-p} \, _2F_1\left (-\frac {1}{2 n},-p;1-\frac {1}{2 n};\frac {b^2 x^{2 n}}{a^2}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((-a + b*x^n)^p*(a + b*x^n)^p)/x^2,x]

[Out]

-(((-a + b*x^n)^p*(a + b*x^n)^p*HypergeometricPFQ[{-1/2*1/n, -p}, {1 - 1/(2*n)}, (b^2*x^(2*n))/a^2])/(x*(1 - (
b^2*x^(2*n))/a^2)^p))

________________________________________________________________________________________

Maple [F]
time = 0.15, size = 0, normalized size = 0.00 \[\int \frac {\left (b \,x^{n}-a \right )^{p} \left (a +b \,x^{n}\right )^{p}}{x^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^n-a)^p*(a+b*x^n)^p/x^2,x)

[Out]

int((b*x^n-a)^p*(a+b*x^n)^p/x^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*x^n)^p*(a+b*x^n)^p/x^2,x, algorithm="maxima")

[Out]

integrate((b*x^n + a)^p*(b*x^n - a)^p/x^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*x^n)^p*(a+b*x^n)^p/x^2,x, algorithm="fricas")

[Out]

integral((b*x^n + a)^p*(b*x^n - a)^p/x^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (- a + b x^{n}\right )^{p} \left (a + b x^{n}\right )^{p}}{x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*x**n)**p*(a+b*x**n)**p/x**2,x)

[Out]

Integral((-a + b*x**n)**p*(a + b*x**n)**p/x**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*x^n)^p*(a+b*x^n)^p/x^2,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^p*(b*x^n - a)^p/x^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,x^n\right )}^p\,{\left (b\,x^n-a\right )}^p}{x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^n)^p*(b*x^n - a)^p)/x^2,x)

[Out]

int(((a + b*x^n)^p*(b*x^n - a)^p)/x^2, x)

________________________________________________________________________________________